package com.hmall.common.client;

import com.hmall.common.pojo.Item;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(value = "itemservice")
public interface ItemClient {

    //查询商品信息
    @GetMapping("/item/{id}")
    Item rowInfo(@PathVariable Long id);

    //扣除库存
    @PutMapping("/item")
    void update(@RequestBody Item item);
}
